package com.bnzj.core.web.security;

import org.springframework.security.core.Authentication;

import javax.servlet.http.HttpServletRequest;

/**
 * @ClassName CustomAccessDecisionRule
 * @Description 已登录用户是否有权限访问某个资源
 * @Author
 * @Date 2020/2/19
 * @Version V1.0
 **/
public interface CustomAccessDecisionRule {
    /**
     * @Description 定义规则，用来判断登录用户是否有访问某个资源的权限
     * @param authentication: 登录用户信息
     * @param request: 请求资源
     * @return: boolean
     * @Author
     * @Date 2020/2/19
     **/
    boolean check(Authentication authentication, HttpServletRequest request);
}
